package com.neusoft.ysu.npms.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.neusoft.ysu.npms.mapper.LogMapper;
import com.neusoft.ysu.npms.mapper.RiskMapper;
import com.neusoft.ysu.npms.pojo.Department;
import com.neusoft.ysu.npms.pojo.Log;
import com.neusoft.ysu.npms.pojo.Result;
import com.neusoft.ysu.npms.pojo.Risk;
import com.neusoft.ysu.npms.service.ILogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 作者：刘金秋
 * @since 2024-06-18
 */
@Service
public class LogServiceImpl extends ServiceImpl<LogMapper, Log> implements ILogService {
    @Autowired
    LogMapper logMapper;

    @Override
    public Result add(Log type) {
        return new Result<>(0, "", logMapper.add(type));
    }
    @Override
    public Result deleteByLogId(Integer logId){
        return new Result<>(0,"",logMapper.deleteByLogId(logId));
    }
    @Override
    public Result updateByLogId(Log log){
        return new Result<>(0,"",logMapper.updateByLogId(log));
    }
    @Override
    public Result selectAll(){return new Result<>(0,"",logMapper.selectAll());}
    @Override
    public Result findById(Log log){return new Result<>(0,"",logMapper.findById(log));}

}
